home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 December / Ahoy_Magazine_85-12_1985_Double_L.d64 / c64 cloak (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  54 lines

  1. 100 mp=828:key=882:by=254:tl=13776:cs=0
  2. 102 print"[147]data cloak"
  3. 104 read k:ifk<0then108
  4. 106 cs=cs+k:pokemp,k:mp=mp+1:goto104
  5. 108 if cs<>tl thenprint"error="cs:goto154
  6. 110 print"okay":syskey:key=key-1
  7. 112 print"encryption key":input ky$:ifky$=""then154
  8. 114 print"source filename":input n1$:ifn1$=""then154
  9. 116 print"file type (p/s/u)":input sf$:ifsf$=""thensf$="p"
  10. 118 print"new filename":input n2$:ifn2$=""then154
  11. 120 print"file type (p/s/u)":input nf$:ifnf$=""thennf$="p"
  12. 122 sf$=","+left$(sf$,1)+",r":nf$=","+left$(nf$,1)+",w"
  13. 124 n1$="0:"+left$(n1$,16)+sf$:n2$="0:"+left$(n2$,16)+nf$
  14. 126 print"opening ";n1$:open15,8,15,"i"
  15. 128 open2,8,2,n1$:gosub158:printdk$:iferthen154
  16. 130 print"opening ";n2$
  17. 132 open 3,8,3,n2$:gosub158:printdk$:iferthen154
  18. 134 forlp=1tolen(ky$):pokekey+lp,asc(mid$(ky$,lp,1)):nextlp
  19. 136 pokekey+lp,0:print"crypting wait"
  20. 138 er=1
  21. 140 get#2,q$:if status and 64 thener=0
  22. 142 k=0:ifq$=""then146
  23. 144 k=asc(q$)
  24. 146 pokeby,k:sys828:k=peek(by)
  25. 148 print#3,chr$(k);:iferthen140
  26. 150 gosub158:printdk$:iferthen154
  27. 152 print" all done."
  28. 154 close2:close3:close15:end
  29. 156 rem disk errors
  30. 158 er=0:input#15,e1,e2$,e3,e4
  31. 160 dk$=str$(e1)+chr$(32)+e2$
  32. 162 ife1>20thener=1:dk$=chr$(18)+dk$
  33. 164 return
  34. 166 data 222,135,090,041,121
  35. 168 data 063,132,255,132,178
  36. 170 data 203,129,179,122,138
  37. 172 data 121,254,135,026,210
  38. 174 data 054,054,121,203,129
  39. 176 data 112,234,120,051,103
  40. 178 data 235,129,026,211,070
  41. 180 data 255,129,211,121,255
  42. 182 data 134,211,122,210,235
  43. 184 data 129,178,186,086,170
  44. 186 data 131,054,152,134,169
  45. 188 data 093,141,002,003,169
  46. 190 data 003,141,003,003,169
  47. 192 data 060,133,251,169,003
  48. 194 data 133,252,160,000,132
  49. 196 data 253,177,251,073,122
  50. 198 data 145,251,200,192,054
  51. 200 data 208,245,169,114,133
  52. 202 data 251,169,003,133,252
  53. 204 data 096,255,-7
  54.